
{% extends TEMPLATE_BASE %}

{% block content %}
  <h2 class="title">{{election.name}} &mdash; 管理选民 <span style="font-size:0.7em;">[<a href="{% url "election@view" election.uuid %}">返回选举</a>]</span></h2>

<form method="get" action="{% url "helios.views.voters_search" election.uuid %}"><b>search</b>: <input type="text" name="q" /> <input type="submit" value="search" /></form>

{% if upload_p %}
<p><a href="{% url "election@voters@upload" election_uuid=election.uuid %}">批量上传选民</a></p>
{% endif %}

Voters {{offset_plus_one}} - {{offset_plus_limit}} &nbsp;&nbsp;

{% if next_after %}
<a href="./manage?after={{next_after}}&offset={{offset_plus_limit}}">> {{limit}}</a> &nbsp;&nbsp;
{% endif %}

{% ifequal offset 0 %}
{% else %}
<a href="./manage">返回开始界面</a> &nbsp;&nbsp;
{% endifequal %}
{% if more_p %}
<a href="./manage?after={{next_after}}&offset={{next_offset}}">> {{limit}}</a>
{% endif %}

<table class="pretty">
<tr><th>别称</th><th>名称</th><th>用户名</th></tr>
{% for voter in voters %}
<tr><td>{{voter.alias}}</td><td>{{voter.name}}</td><td>{{voter.voter_id}}
{% if election.frozen_at %}
{% else %}
[<a onclick="return confirm('are you sure you want to remove {{voter.name}} ?');" href="{% url "election@voter@delete" election.uuid voter.uuid %}">x</a>]
{% endif %}
</td></tr>
{% endfor %}
</table>


{% endblock %}
